{% load staticfiles %}
<!DOCTYPE html>
<html>
  <head>
    <!--
    /**
    * Copyright (c) 2012-2017 RockStor, Inc. <http://rockstor.com>
    * This file is part of RockStor.
    *
    * RockStor is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published
    * by the Free Software Foundation; either version 2 of the License,
    * or (at your option) any later version.
    *
    * RockStor is distributed in the hope that it will be useful, but
    * WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    * General Public License for more details.
    *
    * You should have received a copy of the GNU General Public License
    * along with this program. If not, see <http://www.gnu.org/licenses/>.
    *
    */
    -->

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/png" href="/static/storageadmin/img/favicon.ico">
    <title> Rockstor {% block title %}{% endblock %}</title>
    <link href="/static/storageadmin/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/js/lib/cron/jquery-cron.css" rel="stylesheet">
    <link href="/static/js/lib/gentleSelect/jquery-gentleSelect.css" rel="stylesheet">
    <link href="/static/storageadmin/css/style.css" rel="stylesheet">
    <link href="/static/storageadmin/css/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="/static/storageadmin/css/bootstrap-switch.min.css" rel="stylesheet">
    <link href="/static/storageadmin/css/dataTables.bootstrap.min.css" rel="stylesheet">
    <link href="/static/storageadmin/css/bootstrap-editable.css" rel="stylesheet"/>


    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script>
      /*
      *
      * @licstart  The following is the entire license notice for the
      * JavaScript code in this page.
      *
      * Copyright (c) 2012-2017 RockStor, Inc. <http://rockstor.com>
      * This file is part of RockStor.
      *
      * RockStor is free software; you can redistribute it and/or modify
      * it under the terms of the GNU General Public License as published
      * by the Free Software Foundation; either version 2 of the License,
      * or (at your option) any later version.
      *
      * RockStor is distributed in the hope that it will be useful, but
      * WITHOUT ANY WARRANTY; without even the implied warranty of
      * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      * General Public License for more details.
      *
      * You should have received a copy of the GNU General Public License
      * along with this program. If not, see <http://www.gnu.org/licenses/>.
      *
      * @licend  The above is the entire license notice
      * for the JavaScript code in this page.
      *
      */

    </script>

    <script src="/static/js/lib/json2.js"></script>
    <script src="/static/js/lib/jquery-1.9.1.min.js"></script>
    <script src="/static/js/lib/jquery-migrate-1.2.1.min.js"></script>
    <script src="/static/js/lib/jquery-ui.min.js"></script>
    <script src="/static/js/lib/jquery.tablesorter.js"></script>
    <script src="/static/js/lib/jquery.tools.min.js"></script>
    <script src="/static/js/lib/d3.v3.min.js"></script>
    <script src="/static/js/lib/d3-tip.js"></script>
    <script src="/static/js/lib/cubism.v1.js"></script>
    <script src="/static/js/lib/underscore.js"></script>
    <script src="/static/js/lib/backbone-0.9.2.js"></script>
    <script src="/static/js/lib/backbone.routefilter.min.js"></script>
    <script src="/static/js/lib/cocktail.js"></script>
    <script src="/static/js/lib/bootstrap.js"></script>
    <script src="/static/js/lib/jsonform.js"></script>
    <script src="/static/js/lib/jquery.validate.js"></script>
    <script src="/static/js/lib/jquery.flot.js"></script>
    <script src="/static/js/lib/jquery.flot.navigate.js"></script>
    <script src="/static/js/lib/jquery.flot.resize.js"></script>
    <script src="/static/js/lib/jquery.flot.stack.js"></script>
    <script src="/static/js/lib/jquery.flot.tooltip_0.5.js"></script>
    <script src="/static/js/lib/jquery.flot.axislabels.js"></script>
    <script src="/static/js/lib/jquery.flot.stackpercent.js"></script>
    <script src="/static/js/lib/jquery.flot.time.js"></script>
    <script src="/static/js/lib/jquery.touch-punch.min.js"></script>
    <script src="/static/js/lib/jquery.shapeshift.js"></script>
    <script src="/static/js/lib/jquery.sparkline.min.js"></script>
    <script src="/static/js/lib/humanize.js"></script>
    <script src="/static/js/lib/moment.min.js"></script>
    <script src="/static/js/lib/simple-slider.min.js"></script>
    <script src="/static/js/lib/chosen.jquery.js"></script>
    <script src="/static/js/lib/socket.io.min.js"></script>
    <script src="/static/js/lib/cron/jquery-cron.js"></script>
    <script src="/static/js/lib/cron/jquery-cron-window.js"></script>
    <script src="/static/js/lib/gentleSelect/jquery-gentleSelect.js"></script>
    <script src="/static/js/lib/later.min.js"></script>
    <script src="/static/js/lib/prettycron.js"></script>
    <script src="/static/js/lib/bootstrap-switch.min.js"></script>
    <script src="/static/js/lib/handlebars-v4.0.5.js"></script>
    <script src="/static/js/lib/jquery.dataTables.min.js"></script>
    <script src="/static/js/lib/dataTables.bootstrap.min.js"></script>
    <script src="/static/js/lib/DataTables-addons/file-size.js"></script>
    <script src="/static/js/lib/clipboard.min.js"></script>
    <script src="/static/js/lib/additional-methods.min.js"></script>
    <script src="/static/js/lib/bootstrap-editable.min.js"></script>
    <script src="/static/js/lib/Chart.min.js"></script>
    <script src="/static/js/lib/jquery.i18n/CLDRPluralRuleParser.js"></script>
    <script src="/static/js/lib/jquery.i18n/jquery.i18n.js"></script>
    <script src="/static/js/lib/jquery.i18n/jquery.i18n.messagestore.js"></script>
    <script src="/static/js/lib/jquery.i18n/jquery.i18n.fallbacks.js"></script>
    <script src="/static/js/lib/jquery.i18n/jquery.i18n.parser.js"></script>
    <script src="/static/js/lib/jquery.i18n/jquery.i18n.emitter.js"></script>
    <script src="/static/js/lib/jquery.i18n/jquery.i18n.language.js"></script>
    <script src="/static/storageadmin/js/storageadmin.js"></script>
    <script>
        var langs_folder = '/static/js/lib/jquery.i18n/langs/';
        $.i18n().load({
            de: langs_folder + 'de.json',
            es: langs_folder + 'es.json',
            fr: langs_folder + 'fr.json',
            it: langs_folder + 'it.json'
        });
    </script>
  </head>

  <body>
  <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
          <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
              <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                  <span class="sr-only">Toggle navigation</span>
                  <span class="icon-bar"></span>
                  <span class="icon-bar"></span>
                  <span class="icon-bar"></span>
              </button>
              <div id="navbar-brand">
                  <a href="#/home">
                      <img class="img-responsive logo" src="/static/storageadmin/img/rockstorlogo-font2.png"/>
                  </a>
              </div>
          </div>

          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
              <div id="navbar-links"></div>
          </div><!-- /.navbar-collapse -->
      </div><!-- /.container-fluid -->
  </nav>

  <div id="appliance-breadcrumb">
      <a id="appliance-name" href="#"></a>
      <div id="local-time"><i class="fa fa-clock-o fa-inverse"></i>&nbsp;Local Time:&nbsp;<span/></div>
      <a id="direct-shell" href="#shell"><i class="fa fa-desktop fa-inverse"></i>&nbsp;System Shell</a>
      <div id="shutdown-status"></div>
      <div id="uptime"></div>
      <div id="appliance-loadavg"></div>
      <div id="yum-msg"><a id="yumupdates"></a></div>
  </div>

  <div id="wrapper1">
      <div id="wrapper2">

          <div id="loading-indicator" style="visibility:hidden; z-index: 10000;"><img src="/static/storageadmin/img/ajax-loader.gif"/></div>
          <div id="sidebar">
              <div id="sidebar-inner">
              </div>
          </div>
          <div id="content">
              <div id="browsermsg" style="clear: both;"></div>
              <div id="globalerrmsg"></div>
            <div id="services_modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
                <div class="modal-dialog" style="overflow-y: initial;">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                    </button><br/>
                        </div>
                        <div class="modal-body"></div>
                    </div>
                </div>
            </div>

			<div id="yum_modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
			    <div class="modal-dialog">
					<div class="modal-content">
					    <div class="modal-header">
                            <h3>Yum available updates</h3>
						</div>
						<div class="modal-body" id="yumContent" style="overflow: auto; height: 350px;">
                            <div class="panel-group" id="yum_panels"></div>
                        </div>
						<div class="modal-footer">
							<input type="button" data-dismiss="modal" class="btn btn-default" value="Close">
                            <input type="button" id="yum-run" class="btn btn-primary" value="Update Packages">
					    </div>
				    </div>
				</div>
			</div>

              <div id="maincontent">
                  <!--Body content-->
                  {% block content %}{% endblock %}
              </div>
          </div> <!-- maincontent -->

      </div> <!-- wrapper2 -->
      <div id="footer"></div>
  </div> <!-- wrapper1 -->

  <div class="simple-overlay" id="global-err-overlay">
      <div class="overlay-content"> </div>
  </div>


  <div id="errorPopup" class="modal hide fade" tabindex="-1" role="dialog" >
      <div class="modal-dialog">
          <div class="modal-content">
              <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true" >x</button>
                  <h3>Error!</h3>
              </div>
              <div class="modal-body" id="errorContent" style="overflow: scroll; height: 200px;"></div>
              <div class="modal-footer">
                  <button type="button" data-dismiss="modal" class="btn">Close</button>
              </div>
          </div>
      </div>
  </div>

  <div id="appliance-select-popup" class="modal hide fade">
      <div id="appliance-select-content"></div>
  </div>

  <div class="modal fade" id="donate-modal">
      <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h3 id="donate-modal-label">Thank you! for supporting Rockstor development</h3>
      </div>
      <div class="modal-body">
        <div class="radio">
          <label>
        <input type="radio" name="contrib" id="contrib10" value="10" checked>$10
          </label>
        <div class="radio">
          <label>
        <input type="radio" name="contrib" class="contrib-other" id="contrib20" value="20">$20
          </label>
        </div>
        <div class="radio">
          <label>
        <input type="radio" name="contrib" class="contrib-other" id="contrib30" value="30">$30
          </label>
        </div>
        <div class="radio">
          <label>
        <input type="radio" name="contrib" class="contrib-other" id="contrib50" value="50">$50 (Free Rockstor USB drive)
          </label>
        </div>
        <div class="radio">
          <label>
        <input type="radio" name="contrib" id="contrib-custom" value="custom">Other
          </label>
        </div>
        &nbsp;<input class="span2" id="custom-amount" name="custom-amount" placeholder="Enter amount" style="display: none">
        <br><br>
        <a id="donateYes" class="btn btn-primary" title="Donate">Donate</a>
      </div>
    </div><!-- /.modal-content -->
      </div><!-- /.modal-dialog -->
  </div><!-- /.modal -->


  <form name="dummy-form" action="/login" method="post">
      {% csrf_token %}
  </form>

  <form id="contrib-form" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank"i style="display:none">
      <input type="hidden" name="cmd" value="_xclick" />
      <input type="hidden" name="business" value="WUDA5UNJXDCZ8" />
      <input type="hidden" name="currency_code" value="USD" />
      <input type="hidden" name="item_name" value="Support Rockstor development" />
      <input type="hidden" name="amount" value="10" />
      <input type="hidden" name="cn" value="Note to Rockstor developers" />
      <input type="hidden" name="no_shipping" value="1" />
  </form>

    <script src="/static/js/lib/bootstrap.js"></script>
    <script type="text/javascript">
      {% if current_appliance %}
      setup_done = true;
      {% else %}
      setup_done = false;
      {% endif %}
      {% if request.user.is_authenticated %}
      logged_in = true;
      {% else %}
      logged_in = false;
      {% endif %}
      {% if setup_user %}
      RockStorGlobals.setup_user = true;
      {% else %}
      RockStorGlobals.setup_user = false;
      {% endif %}
      RockStorGlobals.showAnalyticsModal = false;
      RockStorGlobals.pageSize = {{ page_size }};
      RockStorGlobals.updateChannel = "{{ update_channel }}";
    </script>
  <script>
      // Controls hamburger menu collapse after click
      $(document).ready(function() {

        $("body").click(function(event) {
                // only do this if navigation is visible, otherwise you see jump in navigation while collapse() is called
                 if ($(".navbar-collapse").is(":visible") && $(".navbar-toggle").is(":visible") ) {
                    $('.navbar-collapse').collapse('toggle');
                }
          });

      });
  </script>

  </body>
</html>
